home *** CD-ROM | disk | FTP | other *** search
- package java.lang;
-
- import java.io.FileDescriptor;
- import java.net.InetAddress;
- import java.net.URL;
-
- public abstract class SecurityManager {
- protected boolean inCheck;
- private boolean initialized = false;
- private static SecurityManager security;
-
- public synchronized boolean getInCheck() {
- return this.inCheck;
- }
-
- protected SecurityManager() {
- if (security != null) {
- security.checkCreateSecurityManagerAccess(1);
- }
-
- this.initialized = true;
- }
-
- protected native Class[] getClassContext();
-
- protected ClassLoader currentClassLoader() {
- this.checkInitialized();
- return this.currentClassLoader0();
- }
-
- private native ClassLoader currentClassLoader0();
-
- protected Class currentLoadedClass() {
- this.checkInitialized();
- return this.currentLoadedClass0();
- }
-
- protected int classDepth(String var1) {
- this.checkInitialized();
- return this.classDepth0(var1);
- }
-
- private native int classDepth0(String var1);
-
- protected int classLoaderDepth() {
- this.checkInitialized();
- return this.classLoaderDepth0();
- }
-
- private native int classLoaderDepth0();
-
- protected boolean inClass(String var1) {
- this.checkInitialized();
- return this.classDepth(var1) >= 0;
- }
-
- protected boolean inClassLoader() {
- this.checkInitialized();
- return this.currentClassLoader() != null;
- }
-
- public Object getSecurityContext() {
- return null;
- }
-
- public void checkCreateClassLoader() {
- this.checkCreateClassLoader(2);
- }
-
- protected void checkCreateClassLoader(int var1) {
- throw new SecurityException();
- }
-
- public void checkAccess(Thread var1) {
- this.checkAccess((Thread)var1, 2);
- }
-
- protected void checkAccess(Thread var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkAccess(ThreadGroup var1) {
- this.checkAccess((ThreadGroup)var1, 2);
- }
-
- protected void checkAccess(ThreadGroup var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkExit(int var1) {
- this.checkExit(var1, 2);
- }
-
- protected void checkExit(int var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkExec(String var1) {
- this.checkExec(var1, 2);
- }
-
- protected void checkExec(String var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkLink(String var1) {
- this.checkLink(var1, 2);
- }
-
- protected void checkLink(String var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkRead(FileDescriptor var1) {
- this.checkRead((FileDescriptor)var1, 2);
- }
-
- protected void checkRead(FileDescriptor var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkRead(String var1) {
- this.checkRead((String)var1, 2);
- }
-
- protected void checkRead(String var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkRead(String var1, Object var2) {
- this.checkRead(var1, var2, 2);
- }
-
- protected void checkRead(String var1, Object var2, int var3) {
- throw new SecurityException();
- }
-
- public void checkWrite(FileDescriptor var1) {
- this.checkWrite((FileDescriptor)var1, 2);
- }
-
- protected void checkWrite(FileDescriptor var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkWrite(String var1) {
- this.checkWrite((String)var1, 2);
- }
-
- protected void checkWrite(String var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkDelete(String var1) {
- this.checkDelete(var1, 2);
- }
-
- protected void checkDelete(String var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkConnect(String var1, int var2) {
- this.checkConnect(var1, var2, 2);
- }
-
- protected void checkConnect(String var1, int var2, int var3) {
- throw new SecurityException();
- }
-
- public void checkConnect(String var1, int var2, Object var3) {
- this.checkConnect(var1, var2, var3, 2);
- }
-
- protected void checkConnect(String var1, String var2, int var3) {
- throw new SecurityException();
- }
-
- protected void checkConnect(String var1, int var2, Object var3, int var4) {
- throw new SecurityException();
- }
-
- public void checkListen(int var1) {
- this.checkListen(var1, 2);
- }
-
- protected void checkListen(int var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkAccept(String var1, int var2) {
- this.checkAccept(var1, var2, 2);
- }
-
- protected void checkAccept(String var1, int var2, int var3) {
- throw new SecurityException();
- }
-
- public void checkMulticast(InetAddress var1) {
- this.checkMulticast(var1, (int)2);
- }
-
- protected void checkMulticast(InetAddress var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkMulticast(InetAddress var1, byte var2) {
- this.checkMulticast(var1, var2, 2);
- }
-
- protected void checkMulticast(InetAddress var1, byte var2, int var3) {
- throw new SecurityException();
- }
-
- public void checkPropertiesAccess() {
- this.checkPropertiesAccess(2);
- }
-
- protected void checkPropertiesAccess(int var1) {
- throw new SecurityException();
- }
-
- public void checkPropertyAccess(String var1) {
- this.checkPropertyAccess(var1, 2);
- }
-
- protected void checkPropertyAccess(String var1, int var2) {
- throw new SecurityException();
- }
-
- public boolean checkTopLevelWindow(Object var1) {
- return false;
- }
-
- public void checkPrintJobAccess() {
- this.checkPrintJobAccess(2);
- }
-
- protected void checkPrintJobAccess(int var1) {
- throw new SecurityException();
- }
-
- public void checkSystemClipboardAccess() {
- this.checkSystemClipboardAccess(2);
- }
-
- protected void checkSystemClipboardAccess(int var1) {
- throw new SecurityException();
- }
-
- public void checkAwtEventQueueAccess() {
- this.checkAwtEventQueueAccess(2);
- }
-
- protected void checkAwtEventQueueAccess(int var1) {
- throw new SecurityException();
- }
-
- public void checkPackageAccess(String var1) {
- this.checkPackageAccess(var1, 2);
- }
-
- protected void checkPackageAccess(String var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkPackageDefinition(String var1) {
- this.checkPackageDefinition(var1, 2);
- }
-
- protected void checkPackageDefinition(String var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkSetFactory() {
- this.checkSetFactory(2);
- }
-
- protected void checkSetFactory(int var1) {
- throw new SecurityException();
- }
-
- public void checkMemberAccess(Class var1, int var2) {
- this.checkMemberAccess(var1, var2, 2);
- }
-
- protected void checkMemberAccess(Class var1, int var2, int var3) {
- throw new SecurityException();
- }
-
- public void checkSecurityAccess(String var1) {
- this.checkSecurityAccess(var1, 2);
- }
-
- protected void checkSecurityAccess(String var1, int var2) {
- throw new SecurityException();
- }
-
- protected void checkCreateSecurityManagerAccess(int var1) {
- throw new SecurityException();
- }
-
- public void checkCreateSecurityManagerAccess() {
- this.checkCreateSecurityManagerAccess(2);
- }
-
- private native Class currentLoadedClass0();
-
- public ThreadGroup getThreadGroup() {
- return Thread.currentThread().getThreadGroup();
- }
-
- protected boolean checkClassLoader(int var1) {
- this.checkInitialized();
- return this.checkClassLoader0(var1 + 1);
- }
-
- private native boolean checkClassLoader0(int var1);
-
- public void checkURLConnect(URL var1) {
- this.checkURLConnect(var1, 2);
- }
-
- protected void checkURLConnect(URL var1, int var2) {
- throw new SecurityException();
- }
-
- public void checkURLConnect(URL var1, URL var2) {
- this.checkURLConnect(var1, var2, 2);
- }
-
- protected void checkURLConnect(URL var1, URL var2, int var3) {
- throw new SecurityException();
- }
-
- protected void checkAccess(Thread var1, Throwable var2, int var3) {
- throw new SecurityException();
- }
-
- public void checkAccess(Thread var1, Throwable var2) {
- this.checkAccess(var1, var2, 2);
- }
-
- public void checkResourceAccess(String var1) {
- this.checkResourceAccess(var1, 2);
- }
-
- protected void checkResourceAccess(String var1, int var2) {
- throw new SecurityException();
- }
-
- public boolean checkMatchPrincipalAlways(int var1) {
- throw new SecurityException();
- }
-
- private void checkInitialized() {
- if (!this.initialized) {
- throw new SecurityException("Attempted us of uninitialized security manager");
- }
- }
-
- public static void setSecurityManager() {
- if (security != null) {
- throw new SecurityException("SecurityManager already set");
- } else {
- security = System.getSecurityManager();
- }
- }
-
- public static boolean checksMatchPrincipalAlways(int var0) {
- return security != null && !(security instanceof NullSecurityManager) ? security.checkMatchPrincipalAlways(var0 + 1) : true;
- }
-
- protected boolean securityCheckScopePermission(int var1) {
- throw new SecurityException();
- }
-
- public static boolean checkScopePermission(int var0) {
- return security != null && !(security instanceof NullSecurityManager) ? security.securityCheckScopePermission(var0 + 1) : true;
- }
-
- public static void enablePrivilege(String var0) {
- enablePrivilege(var0, 1);
- }
-
- private static void enablePrivilege(String var0, int var1) {
- if (security != null && !(security instanceof NullSecurityManager)) {
- Object var2 = security.securitySetScopePermission(var1 + 1, var0);
- setScopePermissionInternal(var2, var1 + 1);
- }
-
- }
-
- public static boolean isPrivilegeEnabled(String var0) {
- return security != null && !(security instanceof NullSecurityManager) ? security.isPrivilegeEnabled(var0, 1) : true;
- }
-
- protected boolean isPrivilegeEnabled(String var1, int var2) {
- throw new SecurityException();
- }
-
- public static void revertPrivilege() {
- if (security != null && !(security instanceof NullSecurityManager)) {
- setScopePermissionInternal((Object)null, 1);
- }
-
- }
-
- protected Object securitySetScopePermission(int var1) {
- throw new SecurityException();
- }
-
- protected Object securitySetScopePermission(int var1, String var2) {
- throw new SecurityException();
- }
-
- private static native void setScopePermissionInternal(Object var0, int var1);
-
- public static void setScopePermission() {
- enablePrivilege("30Capabilities", 1);
- }
-
- public static void resetScopePermission() {
- if (security != null && !(security instanceof NullSecurityManager)) {
- setScopePermissionInternal((Object)null, 1);
- }
-
- }
- }
-